<html>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>关系导图</title>
    <!--前端图表库-->
    <script type="text/javascript" src="https://cdn.staticfile.org/echarts/4.1.0.rc2/echarts.min.js"></script>
    <script src="__ace_js__/jquery-2.1.4.min.js"></script>
    <script src="__style_js__/require.js"></script>
</head>
<body>
<style>
    html, body, #main {
        width: 100%;
        padding: 0;
        margin: 0;
        height: 100%;
    }
</style>
<div id="main"></div>
<script type="text/javascript">
    $.getJSON("{:url('relation_map')}", { accid: "{$accid}"}, function(json) {
        var chart = echarts.init(document.getElementById('main'), null, {});
        chart.setOption({
            tooltip: {
                trigger: 'item',
                triggerOn: 'mousemove'
            },
            series:[
                {
                    type: 'tree',
                    id: '3',
                    data: [json.data],
                    top: '1%',
                    left: '7%',
                    bottom: '1%',
                    right: '20%',
                    symbolSize: 7,
                    // initialTreeDepth: -1,
                    label: {
                        position: 'left',
                        verticalAlign: 'middle',
                        align: 'right'
                    },
                    leaves: {
                        label: {
                            position: 'right',
                            verticalAlign: 'middle',
                            align: 'left'
                        }
                    },
                    //expandAndCollapse: false,
                    animationDuration: 550,
                    animationDurationUpdate: 750
                }
            ]
        });
    })





    // require.config({
    //     paths : {
    //         //模块名  路径
    //         "a" : "__root__/a",
    //     }
    // })
    // require(["a"],function($){
    //     //alert("load finished");
    // })


</script>
</body>
</html>